#include<iostream>
#include<unistd.h>
#include<signal.h>
void handler(int sig)
{
    std::cout<<"sig: "<<sig<<std::endl;
}
int main()
{
    signal(2,handler);
    signal(3,handler);
    signal(4,handler);
    while(true)
    {
        std::cout<<"hello word,pid = "<<getpid()<<std::endl;
        sleep(1);
    }
    return 0;
}